-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
af-packet: clean up IPS config check #12397
Conversation
Don't emmit generic error statements on things that are not errors. Instead, for cases where (part of) the config is missing, use the defaults and log only a more detailed explanation at the 'config' level. Minor code cleanups.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #12397 +/- ##
==========================================
- Coverage 80.63% 80.62% -0.02%
==========================================
Files 917 917
Lines 258687 258686 -1
==========================================
- Hits 208601 208553 -48
- Misses 50086 50133 +47
Flags with carried forward coverage won't be shown. Click here to find out more. |
Information: QA ran without warnings. Pipeline 24221 |
const char *live_dev = LiveGetDeviceName(ldev); | ||
if (live_dev == NULL) { | ||
SCLogError("Problem with config file"); | ||
return -1; | ||
SCLogConfig("no 'af-packet' section for '%s' in the yaml, default to IDS", live_dev); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was not obvious from LiveGetDeviceName
but looks indeed correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like it should use ldev
as live_dev
will be null here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work :-)
CI : 🟢
Code : good
Commits segmentation : ok
Commit messages : nit typo /emmit/emit/
Git ID set : looks fine for me
CLA : you already contributed
Doc update : not needed
Redmine ticket : not needed
Rustfmt : no rust
Tests : not needed I guess
Dependencies added: none
replaced by #12510 |
Don't emmit generic error statements on things that are not errors. Instead, for cases where (part of) the config is missing, use the defaults and log only a more detailed explanation at the 'config' level.
Minor code cleanups.